﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AutocompleteDemo
{
    internal static class ExceptionHelper
    {
        internal static void VerifyStringArgumentValid(string argument, string argumentName, bool trim)
        {
            if (argument == null)
            {
                throw new ArgumentNullException(argumentName);
            }
            if ((!trim && (argument.Length == 0)) || (trim && (argument.Trim().Length == 0)))
            {
                throw new ArgumentException(argument, argumentName);
            }
        }

    }
}
